#ifndef	__ANY_CAST__H__
#define __ANY_CAST__H__
#include <sstream>

template<typename Target,typename Orign>
Target  Cast(const Orign& data)
{
	Target result;
	std::stringstream interpreter;

	if(!(interpreter << data && interpreter >> result))
		throw std::exception("bad cast from any type to string");
	return result;
}

#endif